﻿
<div class="form-horizontal" ms-controller="ZiDian" style="margin-left:150px; margin-top:50px;">
    <div class="form-group">
        <label class="col-xs-2 control-label" ms-if="modelData.Class==6">栏目名称</label>
        <label class="col-xs-2 control-label" ms-if="modelData.Class==7">日志类型</label>
        <label class="col-xs-2 control-label" ms-if="modelData.Class==8">客户类别</label>
        <label class="col-xs-2 control-label" ms-if="modelData.Class==9">销售阶段</label>
        <label class="col-xs-2 control-label" ms-if="modelData.Class==3">假别设置</label>
        <label class="col-xs-2 control-label" ms-if="modelData.Class==4">类别设置</label>
        <label class="col-xs-2 control-label" ms-if="modelData.Class==10">流程类别</label>
        <label class="col-xs-2 control-label" ms-if="modelData.Class==11">老师类别</label>
        <label class="col-xs-2 control-label" ms-if="modelData.Class==12">计划类别</label>
        <div class="col-xs-4">
            <input type="text" value="" class="span2  form-control szhl_require" ms-duplex="modelData.TypeNO" id="qygg" />
        </div>
    </div>
</div>
<script>
    var tempmodel = avalon.define({
        $id: "ZiDian",
        Class: ComFunJS.getQueryString("Class"),
        modelData: { "TypeNO": "", "Class": "" },
        iswf: false,//是否属于流程表单
        inittemp: function (strId) {
            if (strId) {
                //编辑加载数据
                $.getJSON('/API/FTAPI.ashx?Action=GETCOLUMNBYID', { P1: strId, P2: tempmodel.Class }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        tempmodel.modelData = resultData.Result;
                    }
                })
            } else {
                tempmodel.modelData.Class = tempmodel.Class;
            }
        },//初始化
        SaveData: function (btdom, piid) {
            var data = tempmodel.modelData.$model;
            var modelValue = JSON.stringify(data);
            $.post("/API/FTAPI.ashx?ACTION=MODIFYCOLUMN", { P1: modelValue }, function (result) {
                var jsonresult = $.parseJSON(result)
                btdom.removeClass("disabled").find("i").hide();
                if ($.trim(jsonresult.ErrorMsg) == "") {
                    ComFunJS.winsuccessnew("操作成功");
                }
            });
        },
    });

</script>